package com.yuanchu.gateway.client;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.util.MultiValueMap;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

/**
 * @version: 1.0
 * @Author: adan
 * @description: 通过 FeignAuthClient 来调用 oauth/token 内部接口获取登录认证令牌
 * @date: 2024-01-18 16:05
 */
@FeignClient(value = "yuanchu-auth", fallbackFactory = FeignAuthServiceClientFallbackFactory.class)
public interface FeignAuthClient {


    ///auth/oauth/token?client_id=XcWebApp&client_secret=XcWebApp&grant_type=refresh_token&
    //     refresh_token=
    // 刷新令牌
    @PostMapping("/auth/oauth/token")
    Map<String,String> refreshAccessToken(@RequestParam MultiValueMap<String, String> parameters);



}
